<%= form_for(snippet) do |f| %>
  <% if snippet.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(snippet.errors.count, "error") %> prohibited this snippet from being saved:</h2>

      <ul>
      <% snippet.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %>
    <%= f.text_field :name %>
  </div>

  <div class="field">
    <%= f.label :eval %>
    <%= f.check_box :eval %>
  </div>

  <div class="field">
    <%= f.label :code %>
    <%= f.text_field :code %>
  </div>

  <div class="field">
    <%= f.label :hide %>
    <%= f.check_box :hide %>
  </div>

  <div class="field">
    <%= f.label :example %>
    <%= f.text_field :example %>
  </div>

  <div class="field">
    <%= f.label :language %>
    <%= f.text_field :language %>
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
